import axios from '@/request/http'; // 导入http中创建的axios实例

// 缴费操作接口

const paymentOperation = {

  //////////////// 补录↓
  // 获取补录查询条件
  GetSearchConditionBL:function(gid){
    return axios.post('/server/supplement/load/search',{gradeId:gid})
  },
  // 获取补录列表
  GetPayForStudentList:function(pid,sc,gid,sq,cid,pin){
    return axios.post('/server/supplement/load/list',{projectId:pid,studentSource:sc,schoolId:'',gradeId:gid,studentQuery:sq,classId:cid,page:pin})
  },
  // 获取单个补录详情
  GetPayForStudentDetail:function(pid,sid,scid,secid,gid,sc,pc){
    return axios.post('/server/supplement/load/detail',{projectId:pid,studentId:sid,schoolId:scid,sectionId:secid,gradeId:gid,studentSource:sc,paymentCategory:pc})
  },
  // 验证补录信息
  CheckingSupplement:function(pid,sid){
    return axios.post('/server/supplement/check/special/amount',{projectId:pid,studentId:sid});
  },
  // 保存补录
  SaveSupplement:function(pid,sid,t,sc,tl,p1,p2,p3,p4,rm){
    return axios.post('/server/supplement/save/detail',{projectId:pid,studentId:sid,time:t,studentSource:sc,itemList:JSON.stringify(tl),cardMoney:p1,cashMoney:p2,transferMoney:p3,otherMoney:p4,remark:rm});
  },
  // 打印补录收据
  PrintingSupplementReceipt:function(pid,sid,seid){
    return axios.post('/server/supplement/print/detail',{projectId:pid,studentId:sid,serialId:seid})
  },
  // 下载导出模板
  ExportTemplate:function(pid){
    return axios.post('/server/supplement/export/template',{projectId:pid})
  },
  // 导出模板
  //////////////// 补录↑



  //////////////// 退费↓
  // 获取退费查询条件
  GetSearchConditionTF:function(gid){
    return axios.post('/server/refund/load/search',{gradeId:gid})
  },
  // 获取退费列表
  GetRefundList:function(pid,sc,gid,sq,cid,pin){
    return axios.post('/server/refund/load/list',{projectId:pid,studentSource:sc,schoolId:'',gradeId:gid,studentQuery:sq,classId:cid, page:pin})
  },
  // 获取退费单个详情
  GetRefundDetail:function(pid,sid,scid,secid,gid,sc,pc){
    return axios.post('/server/refund/load/detail',{projectId:pid,studentId:sid,schoolId:scid,sectionId:secid,gradeId:gid,studentSource:sc,paymentCategory:pc})
  },
  // 保存退费
  SaveRefund:function(pid,sid,t,sc,tl,r,fid){
    return axios.post('/server/refund/save/detail',{projectId:pid,studentId:sid,time:t,studentSource:sc,itemList:JSON.stringify(tl),remark:r,fileId:fid,})
  },
  //////////////// 退费↑

  //////////////// 红冲↓
  // 查询红冲查询条件
  GetRectificationCondition:function(gid){
    return axios.post('/server/hongchong/load/search',{gradeId:gid})
  },
  // 获取红冲列表
  GetRectificationList:function(pid,sc,sid,gid,sq,cid,pin){
    return axios.post('/server/hongchong/load/list',{projectId:pid,studentSource:sc,schoolId:sid,gradeId:gid,studentQuery:sq,classId:cid,page:pin})
  },
  // 获取红冲详情
  GetRectificationDetail:function(pid,stid,sid,seid,gid,ss,pc){
    return axios.post('/server/hongchong/load/detail',{projectId:pid,studentId:stid,schoolId:sid,sectionId:seid,gradeId:gid,studentSource:ss,paymentCategory:pc})
  },
  // 保存冲正
  SaveRectification:function(pid,sid,t,sc,tl,p1,p2,p3,p4,r,apc,acc,arc,c){
    return axios.post('/server/hongchong/save/detail',{projectId:pid,studentId:sid,time:t,studentSource:sc,itemList:JSON.stringify(tl),cardMoney:p1,cashMoney:p2,transferMoney:p3,otherMoney:p4, remark:r,autoPayableCount:apc,autoPaidCount:acc,autoReduceCount:arc,cause:c})
  },

  // 红冲打印
  PrintingHongChong(pid,sid,seid){
    return axios.post('/server/hongchong/print/detail',{projectId:pid,studentId:sid,serialId:seid})
  }

  //////////////// 红冲↑

}

export default paymentOperation;
